package com.noranj.web.client;

import java.util.Date;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class DocumentRow extends Composite {

	private static DocumentRowUiBinder uiBinder = GWT
			.create(DocumentRowUiBinder.class);

	interface DocumentRowUiBinder extends UiBinder<Widget, DocumentRow> {
	}

	  @UiField
	  Label title;

	  @UiField
	  Label description;
	  @UiField
	  Label date;
	  
	public DocumentRow() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	  
	  @SuppressWarnings("deprecation")
	public DocumentRow(String title, String description, Date createdOn) {
	    this();
	    this.title.setText(title);
	    this.description.setText(description);
	    this.date.setText(createdOn.toLocaleString());

	  }
}
